import http from '@/utils/http'
const pre = 'device-management'
export const stationList = (params) => {
  const url = `/${pre}/station-management/selectStationPage`
  return http.post(url, params)
}
export const exportStationList = (params) => {
  const url = `/${pre}/station-management/exportStationList`
  return http.post(url, params)
}
export const deleteStation = (params) => {
  const url = `/${pre}/station-management/deleteStation`
  return http.post(url, params)
}
export const enableStation = (params) => {
  const url = `/${pre}/station-management/enableStation`
  return http.post(url, params)
}
export const setStationConfig = (params) => {
  const url = `/${pre}/station-management/setStationConfig`
  return http.post(url, params)
}
export const getStationConfig = (params) => {
  const url = `/${pre}/station-management/getStationConfig`
  return http.post(url, params)
}
export const exportStation = (params) => {
  const url = `/${pre}/station-management/exportStation`
  return http.get({
    url: url,
    params: params,
    responseType: 'blob',
  })
}
export const stationVersionUp = (params) => {
  const url = `/${pre}/station-management/stationVersionUp`
  return http.post(url, params)
}
export const stationDetail = (params) => {
  const url = `/${pre}/station-management/detail/stationDetail`
  return http.post(url, params)
}
export const stationDetailList = (params) => {
  const url = `/${pre}/station-management/detail/selectDevicePage`
  return http.post(url, params)
}
export const activateDevice = (params) => {
  const url = `/${pre}/station-management/detail/activateDevice`
  return http.post(url, params)
}
export const cancelDevice = (params) => {
  const url = `/${pre}/station-management/detail/cancelDevice`
  return http.post(url, params)
}
export const detailSelfCheck = (params) => {
  const url = `/${pre}/station-management/detail/selfCheck`
  return http.post(url, params)
}
export const listTransferStation = (params) => {
  const url = `/${pre}/station-management/detail/listTransferStation`
  return http.post(url, params)
}
export const transferDevice = (params) => {
  const url = `/${pre}/station-management/detail/transferDevice`
  return http.post(url, params)
}
export const coupletCardStatus = (params) => {
  const url = `/${pre}/station-management/detail/coupletCardStatus`
  return http.post(url, params)
}
export const addWhiteList = (params) => {
  const url = `/${pre}/station-management/detail/addWhiteList`
  return http.post(url, params)
}
export const addInternalList = (params) => {
  const url = `/${pre}/station-management/detail/addInternalList`
  return http.post(url, params)
}
export const detailResetDevice = (params) => {
  const url = `/${pre}/station-management/detail/resetDevice`
  return http.post(url, params)
}
export const enableDevice = (params) => {
  const url = `/${pre}/station-management/detail/enableDevice`
  return http.post(url, params)
}
export const getStationTimeCardRules = (params) => {
  const url = `/${pre}/station-management/detail/getStationTimeCardRules`
  return http.post(url, params)
}
export const sendTimeCard = (params) => {
  const url = `/${pre}/station-management/detail/sendTimeCard`
  return http.post(url, params)
}
export const deviceHistoryList = (params) => {
  const url = `/${pre}/device-history/getDeviceHistoryListByPage`
  return http.post(url, params)
}
export const addDeviceHistoryRemark = (params) => {
  const url = `/${pre}/device-history/addDeviceHistoryRemark`
  return http.post(url, params)
}
export const electricCardList = (params) => {
  const url = `/${pre}/chargeCard-management/selectChargeCardPage`
  return http.post(url, params)
}
export const updateChargeCardStatus = (params) => {
  const url = `/${pre}/chargeCard-management/updateChargeCardStatus`
  return http.post(url, params)
}
export const electricCardDetail = (params) => {
  const url = `/${pre}/chargeCard-management/detail/selectChargeCardDetail`
  return http.post(url, params)
}
export const presentTimeCard = (params) => {
  const url = `/${pre}/chargeCard-management/detail/presentTimeCard`
  return http.post(url, params)
}
export const selectTimeCardStation = (params) => {
  const url = `/${pre}/chargeCard-management/detail/selectTimeCardStation`
  return http.get(url, params)
}
export const selectMerchantTimeCardRules = (params) => {
  const url = `/${pre}/chargeCard-management/detail/selectMerchantTimeCardRules`
  return http.get(url, params)
}
export const unBindChargeCard = (params) => {
  const url = `/${pre}/chargeCard-management/unBindChargeCard`
  return http.post(url, params)
}
export const bindChargeCard = (params) => {
  const url = `/${pre}/chargeCard-management/insert/bindChargeCard`
  return http.post(url, params)
}
export const updateChargeCard = (params) => {
  const url = `/${pre}/chargeCard-management/update/updateChargeCard`
  return http.post(url, params)
}

export const selectAndEnergyCard = (params) => {
  const url = `/${pre}/chargeCard-management/detail/selectAndEnergyDefEntityByMerchantId`
  return http.get(url, params)
}

export const presentAndEnergyCard = (params) => {
  const url = `/${pre}/chargeCard-management/detail/presentAndEnergyCard`
  return http.post(url, params)
}

export const cmdList = (params) => {
  const url = `/${pre}/device-management/cmdList`
  return http.post(url, params)
}

export const sendCmd = (params) => {
  const url = `/${pre}/device-management/cmdSend`
  return http.post(url, params)
}

export const deviceList = (params) => {
  const url = `/${pre}/device-management/selectDevicePage`
  return http.post(url, params)
}

export const deviceAlarmList = (params) => {
  const url = `/${pre}/alarm/list`
  return http.get(url, params)
}

export const alarmType = (params) => {
  const url = `/${pre}/alarm/types`
  return http.get(url, params)
}

export const deliverDeviceThreshold = (params) => {
  const url = `/${pre}/device-management/orderQueryDeviceThreshold`
  return http.post(url, params)
}
export const deviceThreshold = (params) => {
  const url = `/${pre}/device-management/queryDeviceThreshold`
  return http.post(url, params)
}
export const updateDeviceThreshold = (params) => {
  const url = `/${pre}/device-management/deployDeviceThreshold`
  return http.post(url, params)
}
export const selfCheck = (params) => {
  const url = `/${pre}/device-management/selfCheck`
  return http.post(url, params)
}
export const resetDevice = (params) => {
  const url = `/${pre}/device-management/resetDevice`
  return http.post(url, params)
}
export const deviceVersionUp = (params) => {
  const url = `/${pre}/device-management/deviceVersionUp`
  return http.post(url, params)
}
export const getDeviceParam = (params) => {
  const url = `/${pre}/device-management/getDeviceParam`
  return http.post(url, params)
}
export const deviceToExcel = (params) => {
  const url = `/${pre}/device-management/deviceToExcel`
  return http.post(url, params)
}
export const cancelDeviceList = (params) => {
  const url = `/${pre}/device-management/cancelDevice`
  return http.post(url, params)
}
export const checkUserCash = (params) => {
  const url = `/${pre}/createstation-management/checkUserCash`
  return http.post(url, params)
}
export const createStation = (params) => {
  const url = `/${pre}/createstation-management/createStation`
  return http.post(url, params)
}
export const deviceLog = (params) => {
  const url = `/${pre}/device-log/queryDeviceLog`
  return http.post(url, params)
}

export const cycleStopStation = (params) => {
  const url = `/${pre}/station-management/cyclestop/cycleStopStation`
  return http.post(url, params)
}

export const queryVersionUpResult = (params) => {
  const url = `/${pre}/device-upgrade/queryVersionUpResult`
  return http.post(url, params)
}
export const versionUpStop = (params) => {
  const url = `/${pre}/device-upgrade/versionUpStop`
  return http.post(url, params)
}
export const getDeviceVersion = (params) => {
  const url = `/${pre}/device-upgrade/getDeviceParam`
  return http.post(url, params)
}
export const versionUpResultToExcel = (params) => {
  const url = `/${pre}/device-upgrade/versionUpResultToExcel`
  return http.get({
    url: url,
    params: params,
    responseType: 'blob',
  })
}
export const deviceVersionUpBatch = (params) => {
  const url = `/${pre}/device-upgrade/deviceVersionUp`
  return http.post(url, params)
}

export const updateDeviceLabel = (params) => {
  const url = `/${pre}/station-management/detail/updateDeviceLabel`
  return http.post(url, params)
}

export const snCodePage = (params) => {
  const url = `/${pre}/sn-code/page`
  return http.post(url, params)
}

export const snCodeBind = (params) => {
  const url = `/${pre}/sn-code/bind`
  return http.post(url, params)
}
export const snCodeUpdate = (params) => {
  const url = `/${pre}/sn-code/update`
  return http.post(url, params)
}
export const snCodeUnbind = (params) => {
  const url = `/${pre}/sn-code/unbind`
  return http.post(url, params)
}

export const snCodeMultiBind = (params) => {
  const url = `/${pre}/sn-code/multiBind`
  return http.post(url, params)
}

export const snCodeMultiUnbind = (params) => {
  const url = `/${pre}/sn-code/multiUnbind`
  return http.post(url, params)
}

export const updateCreateTime = (params) => {
  const url = `/${pre}/device-management/updateCreateTime`
  return http.post(url, params)
}

export const resetCreateTime = (params) => {
  const url = `/${pre}/device-management/resetCreateTime`
  return http.post(url, params)
}
